package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OTestPaperMapper;
import com.education.online.pojo.OTestPaper;
import com.education.online.service.OTestPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 职业技能测试表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:49
 */
@Service
public class OTestPaperServiceImpl implements OTestPaperService {

    @Autowired
    private OTestPaperMapper oTestPaperMapper;

    @Override
    public List<OTestPaper> selectOTestPaperByUserId(Integer userID) {
        return oTestPaperMapper.selectOTestPaperByUserId(userID);
    }

    @Override
    public List<OTestPaper> selectOTestPaperByLikeName(String name) {
        return oTestPaperMapper.selectOTestPaperByLikeName(name);
    }

    //查询职业技能测试表信息
    @Override
    public OTestPaper selectOTestPaperById(Integer id) {
        return oTestPaperMapper.selectOTestPaperById(id);
    }

    // 查询职业技能测试表列表
    @Override
    public List<OTestPaper> selectOTestPaperList(OTestPaper oTestPaper) {
        return oTestPaperMapper.selectOTestPaperList(oTestPaper);
    }

    // 新增职业技能测试表
    @Override
    public int insertOTestPaper(OTestPaper oTestPaper) {
        return oTestPaperMapper.insertOTestPaper(oTestPaper);
    }

    //修改职业技能测试表
    @Override
    public int updateOTestPaper(OTestPaper oTestPaper) {
        return oTestPaperMapper.updateOTestPaper(oTestPaper);
    }

    //删除职业技能测试表对象
    @Override
    public int deleteOTestPaperByIds(String ids) {
        return oTestPaperMapper.deleteOTestPaperByIds(Convert.toStrArray(ids));
    }

    @Override
    public List<OTestPaper> selectOFreeClassByMenuIds(List<Integer> list) {
        return oTestPaperMapper.selectOFreeClassByMenuIds(list);
    }
}